package com.jbm.core.common;

import java.lang.Object;

/**
 * Created by root on 16-10-16.
 */
public interface Life
{
	void Born ( int retry, int timout );
	boolean AmILiving ( );
	boolean IamLiving ( );
	boolean RuLiving ( );
	boolean RuLivingWell ( );
	boolean Wakeup ( Object... args );
	int IsLast ( Object... args );
	boolean Die ( );
	boolean BindParameter ( Object... param );
	Object GetParameter ( int index );
	boolean BindLifeName ( ResKey key );
	ResKey GetLifeName ( );
	boolean SetStatus ( int status );
	int GetStatus ( );
	int GetOverTime ( );

	boolean ReleaseFromPool ( );
	boolean BindPool ( Resource resource );

	void SetUniqueIndex (Object... uniqueidx);
	Object[] GetUniqueIndex ();

	public static final char life_status_newlife = 0;
	public static final char life_status_inqueue = 1;
	public static final char life_status_leftqueue = 2;

	public static final char life_status_close = 6;
	public static final char life_status_svr_break = 7;

	public static final char life_status_authorized = 5;

	public static final char life_status_longlife = 3;
	public static final char life_status_filelife = 4;
}
